package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("admin_role_resources")
@NoArgsConstructor
public class AdminRoleResources implements Serializable {

    private static final long serialVersionUID = 1L;

    public AdminRoleResources(Integer roleId, Integer resourcesId) {
        this.roleId = roleId;
        this.resourcesId = resourcesId;
    }

    /**
     * 角色映射资源主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 角色主键
     */
    @TableField("role_id")
    private Integer roleId;

    /**
     * 资源主键
     */
    @TableField("resources_id")
    private Integer resourcesId;


}
